package com.scnu.yxp.travelapp.me;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.scnu.yxp.travelapp.R;
import com.scnu.yxp.travelapp.adapter.HomePageListViewAdapter;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

public class MyCollection extends Fragment {
	private ListView listView;
	private List<Map<String, String>> list = new ArrayList<Map<String, String>>();
	//homepage的适配器
	private HomePageListViewAdapter adapter;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.my_collection, container,false);
		listView = (ListView)view.findViewById(R.id.listView);
		for(int i = 0; i < 4; i++)
		{
			Map<String, String> listItem = new HashMap<String, String>();
			listItem.put(i+"", i+"");
			list.add(listItem);
		}
		adapter = new HomePageListViewAdapter(getActivity(), list);
		listView.setAdapter(adapter);
		return view;
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		
	}
}
